package com.zwj.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zwj.mapper.UserMapper;
import com.zwj.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : 朱文杰
 * @Create 2022/8/30 22:06
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int insert(User entity) {
        return userMapper.insert(entity);
    }

    @Override
    public int deleteById(Serializable id) {
        return userMapper.deleteById(id);
    }

    @Override
    public int deleteByMap(Map<String, Object> columnMap) {
        return userMapper.deleteByMap(columnMap);
    }

    @Override
    public int delete(Wrapper<User> queryWrapper) {
        return userMapper.delete(queryWrapper);
    }

    @Override
    public int deleteBatchIds(Collection<? extends Serializable> idList) {
        return userMapper.deleteBatchIds(idList);
    }

    @Override
    public int updateById(User entity) {
        return userMapper.updateById(entity);
    }

    @Override
    public int update(User entity, Wrapper<User> updateWrapper) {
        return userMapper.update(entity,updateWrapper);
    }

    @Override
    public User selectById(Serializable id) {
        return userMapper.selectById(id);
    }

    @Override
    public List<User> selectBatchIds(Collection<? extends Serializable> idList) {
        return userMapper.selectBatchIds(idList);
    }

    @Override
    public List<User> selectByMap(Map<String, Object> columnMap) {
        return userMapper.selectByMap(columnMap);
    }

    @Override
    public User selectOne(Wrapper<User> queryWrapper) {
        return userMapper.selectOne(queryWrapper);
    }

    @Override
    public Integer selectCount(Wrapper<User> queryWrapper) {
        return userMapper.selectCount(queryWrapper);
    }

    @Override
    public List<User> selectList(Wrapper<User> queryWrapper) {
        return userMapper.selectList(queryWrapper);
    }

    @Override
    public List<Map<String, Object>> selectMaps(Wrapper<User> queryWrapper) {
        return userMapper.selectMaps(queryWrapper);
    }

    @Override
    public List<Object> selectObjs(Wrapper<User> queryWrapper) {
        return userMapper.selectObjs(queryWrapper);
    }

    @Override
    public <P extends IPage<User>> P selectPage(P page, Wrapper<User> queryWrapper) {
        return userMapper.selectPage(page,queryWrapper);
    }


    @Override
    public <P extends IPage<Map<String, Object>>> P selectMapsPage(P page, Wrapper<User> queryWrapper) {
        return userMapper.selectMapsPage(page,queryWrapper);
    }
}
